package com.example.service.impl.institutioncare.safetyinformation;

import com.example.bean.institutioncare.safetyinformation.SafetyManagement;
import com.example.bean.institutioncare.safetyinformation.SafetyManagementVo;
import com.example.mapper.institutioncare.safetyinformation.SafetyMapper;
import com.example.service.institutioncare.safetyinformation.SafetyService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SafetyServiceImpl implements SafetyService{

    @Autowired
    SafetyMapper mapper;

    @Override
    public PageInfo<SafetyManagement> selectPageInfo(SafetyManagementVo vo){
        int pageNum=vo.getPageNum()==null?1:vo.getPageNum();
        int pageSize=vo.getPageSize()==null?2:vo.getPageSize();
        PageHelper.startPage(pageNum,pageSize);
        return new PageInfo<>(mapper.selectPageInfo(vo));
    }

    @Override
    public Integer addSafetyMana(SafetyManagement safetyMan){
        return mapper.addSafetyMana(safetyMan);
    }

    @Override
    public Integer updaSafetyManana(SafetyManagement safetyMan){
        return mapper.updaSafetyManana(safetyMan);
    }

    @Override
    public Integer updaSafetyManaaa(SafetyManagement safetyMan){
        return mapper.updaSafetyManaaa(safetyMan);
    }

    @Override
    public Integer updaSafetyMana(SafetyManagement safetyMan){
        return mapper.updaSafetyMana(safetyMan);
    }

    @Override
    public Integer updaSafetywei(SafetyManagement safetyMan){
        return mapper.updaSafetywei(safetyMan);
    }

    @Override
    public Integer updaSafetyNanana(SafetyManagement safetyMan){
        return mapper.updaSafetyNanana(safetyMan);
    }

    @Override
    public Integer delete(String noid){
        return mapper.delete(noid);
    }

}